package com.express.tool;

import java.util.Random;

public class CheckCode {

    /**
     * 建议使用
     */
    public static Integer randomCode() {
        StringBuilder str = new StringBuilder();
        Random random = new Random();
        for (int i = 0; i < 6; i++) {
            str.append(random.nextInt(10));
        }
        String s = str.toString();
        int checkCode = Integer.parseInt(s);

        return checkCode;
    }
}
